package com.ruoyi.zhhq.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zhhq.mapper.MeetingorderMapper;
import com.ruoyi.zhhq.domain.Meetingorder;
import com.ruoyi.zhhq.service.IMeetingorderService;

/**
 * 会议订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-27
 */
@Service
public class MeetingorderServiceImpl implements IMeetingorderService 
{
    @Autowired
    private MeetingorderMapper meetingorderMapper;

    /**
     * 查询会议订单
     * 
     * @param orderId 会议订单主键
     * @return 会议订单
     */
    @Override
    public Meetingorder selectMeetingorderByOrderId(String orderId)
    {
        return meetingorderMapper.selectMeetingorderByOrderId(orderId);
    }

    /**
     * 查询会议订单列表
     * 
     * @param meetingorder 会议订单
     * @return 会议订单
     */
    @Override
    public List<Meetingorder> selectMeetingorderList(Meetingorder meetingorder)
    {
        return meetingorderMapper.selectMeetingorderList(meetingorder);
    }

    /**
     * 新增会议订单
     * 
     * @param meetingorder 会议订单
     * @return 结果
     */
    @Override
    public int insertMeetingorder(Meetingorder meetingorder)
    {
        meetingorder.setCreateTime(DateUtils.getNowDate());
        return meetingorderMapper.insertMeetingorder(meetingorder);
    }

    /**
     * 修改会议订单
     * 
     * @param meetingorder 会议订单
     * @return 结果
     */
    @Override
    public int updateMeetingorder(Meetingorder meetingorder)
    {
        meetingorder.setUpdateTime(DateUtils.getNowDate());
        return meetingorderMapper.updateMeetingorder(meetingorder);
    }

    /**
     * 批量删除会议订单
     * 
     * @param orderIds 需要删除的会议订单主键
     * @return 结果
     */
    @Override
    public int deleteMeetingorderByOrderIds(String[] orderIds)
    {
        return meetingorderMapper.deleteMeetingorderByOrderIds(orderIds);
    }

    /**
     * 删除会议订单信息
     * 
     * @param orderId 会议订单主键
     * @return 结果
     */
    @Override
    public int deleteMeetingorderByOrderId(String orderId)
    {
        return meetingorderMapper.deleteMeetingorderByOrderId(orderId);
    }
}
